package com.unitedvision.service;

import java.util.List;

import javax.persistence.EntityNotFoundException;

import com.unitedvision.persistence.domain.GoodsEntity;
import com.unitedvision.persistence.domain.GoodsTypeEntity;

public interface GoodsService {
	void save(GoodsEntity goods);
	void delete(GoodsEntity goods);
	GoodsEntity get(int id) throws EntityNotFoundException;
	List<GoodsEntity> getAll() throws EntityNotFoundException;
	List<GoodsEntity> getByType(GoodsTypeEntity type) throws EntityNotFoundException;
	long count();
	
	void save(GoodsTypeEntity goods);
	void delete(GoodsTypeEntity goods);
	GoodsTypeEntity getType(int id) throws EntityNotFoundException;
	List<GoodsTypeEntity> getAllType() throws EntityNotFoundException;
	long countType();
}
